package io.geekidea.springbootplus.system.service;


import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.system.entity.SysCartItem;
import io.geekidea.springbootplus.system.vo.SysCartItemQueryVo;

import java.util.List;

public interface SysCartItemService extends BaseService<SysCartItem>{
    //将商品加入购物车
    boolean addToCart(SysCartItem cartItem)throws Exception;
    //从购物车中将商品单个删除
    boolean deleteFromCart(int id)throws Exception;
    //从购物车中将所有商品删除
    boolean deleteAllFromCart(List<Integer> ids)throws Exception;
    //根据用户编号获取所有商品数据
    List<SysCartItemQueryVo> findCartItemsByUserId(Integer userId)throws Exception;
    //根据商品编号更新购物车
    boolean updateCartItemByProductId(Integer id)throws Exception;
}
